<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * 微信群发评论模型
 * @package App\Models
 */
class WxMassComment extends Model
{
    use SoftDeletes;
    //主键
    protected $primaryKey = 'id';
    protected $dateFormat = 'Y-m-d H:i:s';
    /**
     * 应该被转换成原生类型的属性。
     * @var array
     */
    protected $casts = [
    ];
    /**
     * 可以被批量赋值的属性
     * @var array
     */
    protected $fillable = [
        'mass_id','msg_data_id','index_num','user_comment_id','around_openid','around_content','around_comment_type','around_create_time',
    ];
    /**
     * 用户信息绑定
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function user()
    {
        return $this->hasOne('App\Models\WxUser','openid', 'around_openid');
    }
}
